import RequestV2 from "@/utils/requestV2";


export function create(data){
  return RequestV2({
    url: 'robot/jobTask/create',
    data: data,
    method: 'POST',
  })
}

export function remove(id){
  return RequestV2({
    url: `robot/jobTask/delete?id=${id}`,
    method: 'post'
  })
}

export function update(data){
  return RequestV2({
    url: 'robot/jobTask/update',
    data: data,
    method: 'POST',
  })
}

export function updateStatus(id,status){
  return RequestV2({
    url: `robot/jobTask/updateStatus?id=${id}&status=${status}`,
    method: "post"
  })
}


export function page(params){
  return RequestV2({
    url: 'robot/jobTask/page',
    params: params,
    method: "get"
  })
}

export function statusOptions() {
  return RequestV2({
    url: "robot/jobTask/statusOptions",
    method: "get"
  });
}


export function trigger(jobId){
  return RequestV2({
    url: `robot/jobTask/trigger?jobId=${jobId}`,
    method: "post"
  })
}
